# -*- coding: utf-8 -*-
"""
Created on Thu Feb 18 12:34:09 2021

@author: DELL-PC
"""
def binary_search(list, item):
    low=0
    high=len(list)-1
    while (low<=high):
        mid=int((low+high)/2)
        
        guess=list[mid]
        if (guess==item):
            return mid
        elif (guess<item):
            low=mid+1
        else:
            high=mid-1
    return None
            
    
def main():
    list1=list(range(0,101,1))
    #print(list1)
    num=99
    print(binary_search(list1,num))
    
if __name__=="__main__":
    main()

